package com.ruoyi.gcgl.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.gcgl.domain.SjChanceLinkman;
import com.ruoyi.gcgl.mapper.SjChanceLinkmanMapper;
import com.ruoyi.gcgl.service.ISjChanceLinkmanService;

/**
 * 商机联系人Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-04
 */
@Service
public class SjChanceLinkmanServiceImpl implements ISjChanceLinkmanService 
{
    @Autowired
    private SjChanceLinkmanMapper sjChanceLinkmanMapper;

    /**
     * 查询商机联系人
     * 
     * @param id 商机联系人主键
     * @return 商机联系人
     */
    @Override
    public SjChanceLinkman selectSjChanceLinkmanById(Long id)
    {
        return sjChanceLinkmanMapper.selectSjChanceLinkmanById(id);
    }

    /**
     * 查询商机联系人列表
     * 
     * @param sjChanceLinkman 商机联系人
     * @return 商机联系人
     */
    @Override
    public List<SjChanceLinkman> selectSjChanceLinkmanList(SjChanceLinkman sjChanceLinkman)
    {
        return sjChanceLinkmanMapper.selectSjChanceLinkmanList(sjChanceLinkman);
    }

    /**
     * 新增商机联系人
     * 
     * @param sjChanceLinkman 商机联系人
     * @return 结果
     */
    @Override
    public int insertSjChanceLinkman(SjChanceLinkman sjChanceLinkman)
    {
        return sjChanceLinkmanMapper.insertSjChanceLinkman(sjChanceLinkman);
    }

    /**
     * 修改商机联系人
     * 
     * @param sjChanceLinkman 商机联系人
     * @return 结果
     */
    @Override
    public int updateSjChanceLinkman(SjChanceLinkman sjChanceLinkman)
    {
        return sjChanceLinkmanMapper.updateSjChanceLinkman(sjChanceLinkman);
    }

    /**
     * 批量删除商机联系人
     * 
     * @param ids 需要删除的商机联系人主键
     * @return 结果
     */
    @Override
    public int deleteSjChanceLinkmanByIds(String ids)
    {
        return sjChanceLinkmanMapper.deleteSjChanceLinkmanByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商机联系人信息
     * 
     * @param id 商机联系人主键
     * @return 结果
     */
    @Override
    public int deleteSjChanceLinkmanById(Long id)
    {
        return sjChanceLinkmanMapper.deleteSjChanceLinkmanById(id);
    }
}
